
/**
 * This enum represents the color of a player on the board.
 * 
 * @author jhaberstro
 */
public enum ColorType
{
	NONE(-1),
	BLACK (0),
	WHITE (1);
	
	private int value;
	
	/**
	 * Construct a new ColorType with a specific value.
	 * @param v
	 */
	ColorType(int v) {
		value = v;
	}
	
	/**
	 * Get the integer value
	 * @return the integer value
	 */
	public int getValue() {
		return value;
	}
	
	/**
	 * Create a string representation for serialization over the network.
	 * @return the string representation.
	 */
	public String toString() {
		if (value == ColorType.BLACK.getValue()) {
			return "b";
		}
		else if (value == ColorType.WHITE.getValue()){
			return "w";
		}
		else {
			return "";
		}
	}
};
